<!DOCTYPE html>
<!-- 网页使用的语言 -->
<html lang="zh-CN">
    <head>
    	<base href="<%=basePath%>"/>
        <!-- 指定字符集 -->
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>修改用户</title>

        <link href="/static/css/bootstrap.min.css" rel="stylesheet">
        <script src="/static/js/jquery-2.1.0.min.js"></script>
        <script src="/static/js/bootstrap.min.js"></script>
        
    </head>
    <body>
    <ul class="nav nav-pills">
        <li role="presentation"><a href="/main/">主页</a></li>
  <li role="presentation" ><a href="/presslist/">出版社列表</a></li>
    <li role="presentation"><a href="/booklist/">图书列表</a></li>
  <li role="presentation"><a href="/booktypelist/">图书类型</a></li>
</ul>
    
    
    
    
        <div class="container" style="width: 400px;">
        <h3 style="text-align: center;">修改图书信息</h3>
            
        
        <form action="/bookupdate/" method="post" enctype="multipart/form-data">
            <input type="hidden" name="id" value="{{ book.id }}">
            
          <div class="form-group">
            <label for="bookname">图书名称：</label>
            <input type="text" class="form-control" id="bookname" value="{{ book.bookname }}" name="bookname" placeholder="请输入出版社名称" required />
          </div>

            
          <div class="form-group">
            <label for="bookprice">图书价格：</label>
            <input type="number" class="form-control" id="bookprice" value="{{ book.bookprice }}" name="bookprice" placeholder="请输入图书价格" required />
          </div>
            <div class="form-group">
            <label for="bookauthor">作者：</label>
            <input type="text" class="form-control" id="bookauthor" value="{{ book.bookauthor }}" name="bookauthor" placeholder="请输入图书作者" required />
          </div>
            <div class="form-group">
            <label for="bookimg">图书图片：</label>
            <input type="file" class="form-control" id="bookimg"  name="bookimg"  />
                <img src="{{ book.bookimg }}" width="100px" height="100px" >  
                <input type="hidden" name="bookimgname" value="{{ book.bookimg }}">
          </div>
            <div class="form-group">
                <label for="bookaddress">出版社地址：</label>
                <select name="press" class="form-control" id = "press" >
                    {% for press in presslist %}
                        {% if press.pressname == book.press.pressname %}
                            <option value="{{ press.id }}" selected>{{ press.pressname }}</option>
                        {% else %}
                            <option value="{{ press.id }}">{{ press.pressname }}</option>
                        {% endif %}
                    {% endfor %}
                </select>
          
          </div>
            

             <div class="form-group" style="text-align: center">
                <input class="btn btn-primary" type="submit" value="提交" />
                <input class="btn btn-default" type="reset" value="重置" onclick="location.reload()"/>
                <a class="btn btn-default" href="/booklist">返回</a>
                
             </div>
        </form>
        </div>
    </body>
</html>